class Category {
  final String name;
  final int numOfCourses;
  final String image;

  Category(this.name, this.numOfCourses, this.image);
}

List<Category> categories = categoriesData
    .map((item) => Category(item['name'], item['courses'], item['image']))
    .toList();

var categoriesData = [
  {
    "name": "基础",
    'courses': 17,
    'image':
        "https://img0.baidu.com/it/u=3992808249,1134778645&fm=26&fmt=auto&gp=0.jpg"
  },
  {
    "name": "进阶",
    'courses': 25,
    'image':
        "https://img0.baidu.com/it/u=3604825410,2193292528&fm=26&fmt=auto&gp=0.jpg"
  },
  {
    "name": "小实战",
    'courses': 13,
    'image':
        "https://img2.baidu.com/it/u=2214640691,529623066&fm=26&fmt=auto&gp=0.jpg"
  },
  {
    "name": "未完待续",
    'courses': 10,
    'image':
        "https://img0.baidu.com/it/u=2798297232,3761605000&fm=26&fmt=auto&gp=0.jpg"
  },
];
